<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>lastfm</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/python-lastfm/">python-lastfm</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        Package&nbsp;lastfm
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="lastfm-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="lastfm-module.html">Package lastfm</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno"> 1</tt>  <tt class="py-line"><tt class="py-comment">#!/usr/bin/env python</tt> </tt>
<a name="L2"></a><tt class="py-lineno"> 2</tt>  <tt class="py-line"><tt class="py-docstring">"""A python interface to the last.fm web services API"""</tt> </tt>
<a name="L3"></a><tt class="py-lineno"> 3</tt>  <tt class="py-line"> </tt>
<a name="L4"></a><tt class="py-lineno"> 4</tt>  <tt class="py-line"><tt class="py-name">__author__</tt> <tt class="py-op">=</tt> <tt class="py-string">"Abhinav Sarkar &lt;abhinav@abhinavsarkar.net&gt;"</tt> </tt>
<a name="L5"></a><tt class="py-lineno"> 5</tt>  <tt class="py-line"><tt class="py-name">__version__</tt> <tt class="py-op">=</tt> <tt class="py-string">"0.2"</tt> </tt>
<a name="L6"></a><tt class="py-lineno"> 6</tt>  <tt class="py-line"><tt class="py-name">__license__</tt> <tt class="py-op">=</tt> <tt class="py-string">"GNU Lesser General Public License"</tt> </tt>
<a name="L7"></a><tt class="py-lineno"> 7</tt>  <tt class="py-line"> </tt>
<a name="L8"></a><tt class="py-lineno"> 8</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L9"></a><tt class="py-lineno"> 9</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L10"></a><tt class="py-lineno">10</tt>  <tt class="py-line"><tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">append</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">dirname</tt><tt class="py-op">(</tt><tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">dirname</tt><tt class="py-op">(</tt><tt class="py-name">__file__</tt><tt class="py-op">)</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L11"></a><tt class="py-lineno">11</tt>  <tt class="py-line"> </tt>
<a name="L12"></a><tt class="py-lineno">12</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-0" class="py-name" targets="Package lastfm=lastfm-module.html"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-0', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-1" class="py-name" targets="Module lastfm.album=lastfm.album-module.html,Variable lastfm.track.Track.album=lastfm.track.Track-class.html#album"><a title="lastfm.album
lastfm.track.Track.album" class="py-name" href="#" onclick="return doclink('link-1', 'album', 'link-1');">album</a></tt> <tt class="py-keyword">import</tt> <tt id="link-2" class="py-name" targets="Class lastfm.album.Album=lastfm.album.Album-class.html"><a title="lastfm.album.Album" class="py-name" href="#" onclick="return doclink('link-2', 'Album', 'link-2');">Album</a></tt> </tt>
<a name="L13"></a><tt class="py-lineno">13</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-3" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-3', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-4" class="py-name" targets="Module lastfm.api=lastfm.api-module.html"><a title="lastfm.api" class="py-name" href="#" onclick="return doclink('link-4', 'api', 'link-4');">api</a></tt> <tt class="py-keyword">import</tt> <tt id="link-5" class="py-name" targets="Class lastfm.api.Api=lastfm.api.Api-class.html"><a title="lastfm.api.Api" class="py-name" href="#" onclick="return doclink('link-5', 'Api', 'link-5');">Api</a></tt> </tt>
<a name="L14"></a><tt class="py-lineno">14</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-6" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-6', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-7" class="py-name" targets="Variable lastfm.album.Album.artist=lastfm.album.Album-class.html#artist,Module lastfm.artist=lastfm.artist-module.html,Variable lastfm.track.Track.artist=lastfm.track.Track-class.html#artist"><a title="lastfm.album.Album.artist
lastfm.artist
lastfm.track.Track.artist" class="py-name" href="#" onclick="return doclink('link-7', 'artist', 'link-7');">artist</a></tt> <tt class="py-keyword">import</tt> <tt id="link-8" class="py-name" targets="Class lastfm.artist.Artist=lastfm.artist.Artist-class.html"><a title="lastfm.artist.Artist" class="py-name" href="#" onclick="return doclink('link-8', 'Artist', 'link-8');">Artist</a></tt> </tt>
<a name="L15"></a><tt class="py-lineno">15</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-9" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-9', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-10" class="py-name" targets="Module lastfm.error=lastfm.error-module.html"><a title="lastfm.error" class="py-name" href="#" onclick="return doclink('link-10', 'error', 'link-10');">error</a></tt> <tt class="py-keyword">import</tt> <tt id="link-11" class="py-name" targets="Class lastfm.error.LastfmError=lastfm.error.LastfmError-class.html"><a title="lastfm.error.LastfmError" class="py-name" href="#" onclick="return doclink('link-11', 'LastfmError', 'link-11');">LastfmError</a></tt> </tt>
<a name="L16"></a><tt class="py-lineno">16</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-12" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-12', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Module lastfm.event=lastfm.event-module.html"><a title="lastfm.event" class="py-name" href="#" onclick="return doclink('link-13', 'event', 'link-13');">event</a></tt> <tt class="py-keyword">import</tt> <tt id="link-14" class="py-name" targets="Class lastfm.event.Event=lastfm.event.Event-class.html"><a title="lastfm.event.Event" class="py-name" href="#" onclick="return doclink('link-14', 'Event', 'link-14');">Event</a></tt> </tt>
<a name="L17"></a><tt class="py-lineno">17</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-15" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-15', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-16" class="py-name" targets="Module lastfm.geo=lastfm.geo-module.html"><a title="lastfm.geo" class="py-name" href="#" onclick="return doclink('link-16', 'geo', 'link-16');">geo</a></tt> <tt class="py-keyword">import</tt> <tt id="link-17" class="py-name" targets="Class lastfm.geo.Location=lastfm.geo.Location-class.html"><a title="lastfm.geo.Location" class="py-name" href="#" onclick="return doclink('link-17', 'Location', 'link-17');">Location</a></tt><tt class="py-op">,</tt> <tt id="link-18" class="py-name" targets="Class lastfm.geo.Country=lastfm.geo.Country-class.html"><a title="lastfm.geo.Country" class="py-name" href="#" onclick="return doclink('link-18', 'Country', 'link-18');">Country</a></tt> </tt>
<a name="L18"></a><tt class="py-lineno">18</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-19" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-19', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-20" class="py-name" targets="Module lastfm.group=lastfm.group-module.html"><a title="lastfm.group" class="py-name" href="#" onclick="return doclink('link-20', 'group', 'link-20');">group</a></tt> <tt class="py-keyword">import</tt> <tt id="link-21" class="py-name" targets="Class lastfm.group.Group=lastfm.group.Group-class.html"><a title="lastfm.group.Group" class="py-name" href="#" onclick="return doclink('link-21', 'Group', 'link-21');">Group</a></tt> </tt>
<a name="L19"></a><tt class="py-lineno">19</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-22" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-22', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-23" class="py-name" targets="Variable lastfm.album.Album.playlist=lastfm.album.Album-class.html#playlist,Module lastfm.playlist=lastfm.playlist-module.html,Variable lastfm.tag.Tag.playlist=lastfm.tag.Tag-class.html#playlist"><a title="lastfm.album.Album.playlist
lastfm.playlist
lastfm.tag.Tag.playlist" class="py-name" href="#" onclick="return doclink('link-23', 'playlist', 'link-23');">playlist</a></tt> <tt class="py-keyword">import</tt> <tt id="link-24" class="py-name" targets="Class lastfm.playlist.Playlist=lastfm.playlist.Playlist-class.html,Class lastfm.user.User.Playlist=lastfm.user.User.Playlist-class.html"><a title="lastfm.playlist.Playlist
lastfm.user.User.Playlist" class="py-name" href="#" onclick="return doclink('link-24', 'Playlist', 'link-24');">Playlist</a></tt> </tt>
<a name="L20"></a><tt class="py-lineno">20</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-25" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-25', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-26" class="py-name" targets="Module lastfm.objectcache=lastfm.objectcache-module.html"><a title="lastfm.objectcache" class="py-name" href="#" onclick="return doclink('link-26', 'objectcache', 'link-26');">objectcache</a></tt> <tt class="py-keyword">import</tt> <tt id="link-27" class="py-name" targets="Class lastfm.objectcache.ObjectCache=lastfm.objectcache.ObjectCache-class.html"><a title="lastfm.objectcache.ObjectCache" class="py-name" href="#" onclick="return doclink('link-27', 'ObjectCache', 'link-27');">ObjectCache</a></tt> </tt>
<a name="L21"></a><tt class="py-lineno">21</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-28" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-28', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-29" class="py-name" targets="Variable lastfm.event.Event.tag=lastfm.event.Event-class.html#tag,Module lastfm.tag=lastfm.tag-module.html"><a title="lastfm.event.Event.tag
lastfm.tag" class="py-name" href="#" onclick="return doclink('link-29', 'tag', 'link-29');">tag</a></tt> <tt class="py-keyword">import</tt> <tt id="link-30" class="py-name" targets="Class lastfm.tag.Tag=lastfm.tag.Tag-class.html"><a title="lastfm.tag.Tag" class="py-name" href="#" onclick="return doclink('link-30', 'Tag', 'link-30');">Tag</a></tt> </tt>
<a name="L22"></a><tt class="py-lineno">22</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-31" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-31', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-32" class="py-name" targets="Module lastfm.tasteometer=lastfm.tasteometer-module.html"><a title="lastfm.tasteometer" class="py-name" href="#" onclick="return doclink('link-32', 'tasteometer', 'link-32');">tasteometer</a></tt> <tt class="py-keyword">import</tt> <tt id="link-33" class="py-name" targets="Class lastfm.tasteometer.Tasteometer=lastfm.tasteometer.Tasteometer-class.html"><a title="lastfm.tasteometer.Tasteometer" class="py-name" href="#" onclick="return doclink('link-33', 'Tasteometer', 'link-33');">Tasteometer</a></tt> </tt>
<a name="L23"></a><tt class="py-lineno">23</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-34" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-34', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-35" class="py-name" targets="Module lastfm.track=lastfm.track-module.html"><a title="lastfm.track" class="py-name" href="#" onclick="return doclink('link-35', 'track', 'link-35');">track</a></tt> <tt class="py-keyword">import</tt> <tt id="link-36" class="py-name" targets="Class lastfm.track.Track=lastfm.track.Track-class.html"><a title="lastfm.track.Track" class="py-name" href="#" onclick="return doclink('link-36', 'Track', 'link-36');">Track</a></tt> </tt>
<a name="L24"></a><tt class="py-lineno">24</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-37" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-37', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-38" class="py-name" targets="Module lastfm.user=lastfm.user-module.html,Variable lastfm.user.User.Library.user=lastfm.user.User.Library-class.html#user,Variable lastfm.user.User.Playlist.user=lastfm.user.User.Playlist-class.html#user"><a title="lastfm.user
lastfm.user.User.Library.user
lastfm.user.User.Playlist.user" class="py-name" href="#" onclick="return doclink('link-38', 'user', 'link-38');">user</a></tt> <tt class="py-keyword">import</tt> <tt id="link-39" class="py-name" targets="Class lastfm.user.User=lastfm.user.User-class.html"><a title="lastfm.user.User" class="py-name" href="#" onclick="return doclink('link-39', 'User', 'link-39');">User</a></tt> </tt>
<a name="L25"></a><tt class="py-lineno">25</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-40" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-40', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-41" class="py-name" targets="Variable lastfm.event.Event.venue=lastfm.event.Event-class.html#venue,Module lastfm.venue=lastfm.venue-module.html"><a title="lastfm.event.Event.venue
lastfm.venue" class="py-name" href="#" onclick="return doclink('link-41', 'venue', 'link-41');">venue</a></tt> <tt class="py-keyword">import</tt> <tt id="link-42" class="py-name" targets="Class lastfm.venue.Venue=lastfm.venue.Venue-class.html"><a title="lastfm.venue.Venue" class="py-name" href="#" onclick="return doclink('link-42', 'Venue', 'link-42');">Venue</a></tt> </tt>
<a name="L26"></a><tt class="py-lineno">26</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-43" class="py-name"><a title="lastfm" class="py-name" href="#" onclick="return doclink('link-43', 'lastfm', 'link-0');">lastfm</a></tt><tt class="py-op">.</tt><tt id="link-44" class="py-name" targets="Module lastfm.shout=lastfm.shout-module.html"><a title="lastfm.shout" class="py-name" href="#" onclick="return doclink('link-44', 'shout', 'link-44');">shout</a></tt> <tt class="py-keyword">import</tt> <tt id="link-45" class="py-name" targets="Class lastfm.shout.Shout=lastfm.shout.Shout-class.html"><a title="lastfm.shout.Shout" class="py-name" href="#" onclick="return doclink('link-45', 'Shout', 'link-45');">Shout</a></tt> </tt>
<a name="L27"></a><tt class="py-lineno">27</tt>  <tt class="py-line"> </tt>
<a name="L28"></a><tt class="py-lineno">28</tt>  <tt class="py-line"><tt class="py-name">__all__</tt> <tt class="py-op">=</tt> <tt class="py-op">[</tt><tt class="py-string">'LastfmError'</tt><tt class="py-op">,</tt> <tt class="py-string">'Api'</tt><tt class="py-op">,</tt> <tt class="py-string">'Album'</tt><tt class="py-op">,</tt> <tt class="py-string">'Artist'</tt><tt class="py-op">,</tt> <tt class="py-string">'Event'</tt><tt class="py-op">,</tt> </tt>
<a name="L29"></a><tt class="py-lineno">29</tt>  <tt class="py-line">           <tt class="py-string">'Location'</tt><tt class="py-op">,</tt> <tt class="py-string">'Country'</tt><tt class="py-op">,</tt> <tt class="py-string">'Group'</tt><tt class="py-op">,</tt> <tt class="py-string">'Playlist'</tt><tt class="py-op">,</tt> <tt class="py-string">'Tag'</tt><tt class="py-op">,</tt> </tt>
<a name="L30"></a><tt class="py-lineno">30</tt>  <tt class="py-line">           <tt class="py-string">'Tasteometer'</tt><tt class="py-op">,</tt> <tt class="py-string">'Track'</tt><tt class="py-op">,</tt> <tt class="py-string">'User'</tt><tt class="py-op">,</tt> <tt class="py-string">'Venue'</tt><tt class="py-op">,</tt> <tt class="py-string">'ObjectCache'</tt><tt class="py-op">]</tt> </tt>
<a name="L31"></a><tt class="py-lineno">31</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th bgcolor="#70b0f0" class="navbar-select"
          >&nbsp;&nbsp;&nbsp;Home&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/python-lastfm/">python-lastfm</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Tue Mar 10 11:14:39 2009
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
